<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

ini_set('max_execution_time', 3600);
ini_set('memory_limit', '128M');
include_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/engine/start.php');
include_once(dirname(dirname(__FILE__)) . '/_init.php');

$query = 'INSERT IGNORE INTO whiteboard_friends(user_id, friend_id)
            SELECT guid_one, guid_two FROM 3lGG_entity_relationships
            WHERE relationship = \'{"app":"whiteboard","relationship":"friend"}\'';

safe_insert_query($query);

$query = 'INSERT IGNORE INTO whiteboard_follows(user_id, follow_id)
            SELECT guid_one, guid_two FROM 3lGG_entity_relationships
            WHERE relationship = \'{"app":"whiteboard","relationship":"following"}\'';

safe_insert_query($query);

$query = 'INSERT IGNORE INTO drawing_favorites(user_id, favorite_id)
            SELECT guid_one, guid_two FROM 3lGG_entity_relationships
            WHERE relationship = \'{"app":"whiteboard","relationship":"favorite"}\'';

safe_insert_query($query);
?>
